from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import relationship

from fastapi_common.db.base_class import Base


class Role(Base):
    id = Column(Integer, primary_key=True, autoincrement=True)
    role_name = Column(String(length=255), comment='角色名')
    others = Column(String(length=255), comment='其他（预留）')
    users = relationship('User', back_populates='role')
    # role_menus = relationship('RoleMenu', back_populates='role')

